#ifndef __SCENE0917_H__
#define __SCENE0917_H__


#include "cocos2d.h"
#include "Scene0910.h"
#include "Player.h"
#include "constant.h"
#include "CommonFunction.h"
#include "CardGame.h"
#include "ui\CocosGUI.h"//cocos2d里的ui库

using namespace cocos2d::ui;
USING_NS_CC;

class Scene0917 : public Scene
{
public:
	static Scene *createScene();
	virtual bool init();

	Size visibleSize;
	void setRoomId(int roomId);//设置房间号


	CREATE_FUNC(Scene0917);
private:
	Player *player_self;
	Player *player_lelf;
	Player *player_front;
	Player *player_right;
	int self_pos;

	CardGame *game;//纸牌游戏
	float cardOriginY;//纸牌原始的Y轴位置

	void loadPlayerUI(Player *player);

	void beginGame(Ref *sender);//开始游戏

	void closeItemClicked(Ref *sender);//关闭
	char getPlayerCharPosition(int pos);

	//onTouchBegin当点开开始时触发
	bool onTouchBegin(Touch *touch, Event *event);

	//onTouchMoved 当有移动手势发生时触发
	void onTouchMoved(Touch *touch, Event *event);

	//Button按钮的点击事件
	void buttonClicked(Ref *sender,Widget::TouchEventType type);
};

#endif